package products;

enum State{NEW,LOADED,CHANGED};

public class Product {
	private String nume;
	private String description;
	private double cost;
	private State state = State.NEW;
	public String getNume() {
		return nume;
	}
	public void setNume(String nume) {
		this.nume = nume;
	}
	public String getDescription() {
		return description;
	}
	public void setDescription(String description) {
		this.description = description;
	}
	public double getCost() {
		return cost;
	}
	public void setCost(double cost) {
		this.cost = cost;
	}
	public State getState() {
		return state;
	}
	public void setState(State state) {
		this.state = state;
	}
	@Override
	public String toString() {
		return "ProductMemento [nume=" + nume + ", description=" + description
				+ ", cost=" + cost + ", state=" + state + "]";
	}
	public Product(String nume, String description, double cost,
			State state) {
		super();
		this.nume = nume;
		this.description = description;
		this.cost = cost;
		this.state = state;
	}
	
	public ProductMemento memento(){
		return new ProductMemento(nume, description, cost, state);
	}
}
